Skip to content

[https://nvbugs/6490028][fix] Bump only the cross-library cublas_tolerance from 1.05 to 1.10 in the test…#16788

Open
trtllm-agent wants to merge 2 commits into
NVIDIA:mainfrom
tensorrt-cicd:repair-bot-bug6490028
Open

[https://nvbugs/6490028][fix] Bump only the cross-library cublas_tolerance from 1.05 to 1.10 in the test…#16788
trtllm-agent wants to merge 2 commits into
NVIDIA:mainfrom
tensorrt-cicd:repair-bot-bug6490028

Conversation

@trtllm-agent

@trtllm-agent trtllm-agent commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Root cause: cublas_tolerance=1.05 on a cross-library ~28us GEMM comparison profiled over only 20 iterations is inside the measurement's own run-to-run noise floor, so the test flakes above threshold by <1% intermittently.
  • Fix: Bump only the cross-library cublas_tolerance from 1.05 to 1.10 in the test; keep the intra-CuteDSL 1.05 tolerance unchanged. Added a comment explaining why the two tolerances differ.
  • Automated fix generated by repair-bot

Test plan

  • Verify fix on the same GPU type as the original failure
  • Check for regressions in related tests

Links

Dev Engineer Review

  • In test_cutedsl_nvfp4_heuristic_matches_full_sweep, loosened the cuBLASLt cross-library comparison bound by changing cublas_tolerance from 1.05 to 1.10.
  • Kept the intra-CuteDSL tolerance at 1.05, with added comments documenting that the change is specifically for the CuteDSL-vs-cuBLASLt comparison and is intended to tolerate run-to-run timing noise.
  • Change is narrowly scoped to the heuristic-test tolerance/expectation; no API/config/error-handling behavior changes.

QA Engineer Review

  • Modified test: tests/unittest/_torch/misc/test_autotuner.py::test_cutedsl_nvfp4_heuristic_matches_full_sweep (updated cross-library tolerance and rationale comments).
  • Test-list change: updated tests/integration/test_lists/waives.txt by removing the waiver/skip entry for unittest/_torch/misc/test_autotuner.py::test_cutedsl_nvfp4_heuristic_matches_full_sweep.
  • Coverage: not identified as present/updated in test-db/ or qa/.
  • Verdict: needs follow-up.

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The CuteDSL autotuner test increases the cuBLASLt comparison tolerance from 1.05 to 1.10, documents cross-library profiling variability, and removes the test from the integration waivers list.

Changes

Autotuner tolerance adjustment

Layer / File(s) Summary
Cross-library tolerance validation
tests/unittest/_torch/misc/test_autotuner.py, tests/integration/test_lists/waives.txt
The CuteDSL-versus-cuBLASLt assertion uses a 1.10 tolerance with comments documenting profiling jitter, and the test is removed from the waivers list.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: bowenfu

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is specific and accurately summarizes the main change: increasing the cross-library cublas_tolerance for the test.
Description check ✅ Passed The description covers the issue, fix, test plan, and bug link, but it doesn't follow the template's exact section headings.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/unittest/_torch/misc/test_autotuner.py`:
- Around line 1263-1267: Register
test_cutedsl_nvfp4_heuristic_matches_full_sweep in both the test-db and qa
test-list registries under tests/integration/test_lists, and add the
corresponding CBTS coverage entry using the repository’s existing conventions so
the test is included in CI and QA routing.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: f9ea4ac7-e591-44a6-be38-71ef96ceaa46

📥 Commits

Reviewing files that changed from the base of the PR and between 93efd33 and 75e2cee.

📒 Files selected for processing (1)
  • tests/unittest/_torch/misc/test_autotuner.py

Comment thread tests/unittest/_torch/misc/test_autotuner.py
trtllm-agent and others added 2 commits July 24, 2026 00:26
… NVFP4 test

The heuristic-vs-cuBLASLt comparison in
test_cutedsl_nvfp4_heuristic_matches_full_sweep uses a 1.05x tolerance on a
~28us GEMM kernel profiled over only 20 iterations. Run-to-run jitter from
DVFS, L2 residency, and interleaving with cuBLAS autotune warmup easily
exceeds 5% at this kernel scale, so the bound is inside the measurement
noise floor and the test flakes above threshold by <1% intermittently.

Relax cublas_tolerance to 1.10 (the intra-CuteDSL sweep-vs-heuristic 1.05
tolerance is unchanged -- that comparison is the actual pruning-feature
invariant and is not cross-library).

Signed-off-by: trtllm-agent <296075020+trtllm-agent@users.noreply.github.com>
Signed-off-by: handongl <handongl@nvidia.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
tests/integration/test_lists/waives.txt (1)

1-1: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Add the required NVIDIA copyright header.

This modified file has no visible NVIDIA copyright header. Add the header and update its copyright year as required by the repository guidelines.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/integration/test_lists/waives.txt` at line 1, Add the
repository-standard NVIDIA copyright header at the beginning of
tests/integration/test_lists/waives.txt, using the current required copyright
year while preserving the existing waiver entry unchanged.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@tests/integration/test_lists/waives.txt`:
- Line 1: Add the repository-standard NVIDIA copyright header at the beginning
of tests/integration/test_lists/waives.txt, using the current required copyright
year while preserving the existing waiver entry unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 9d9ad966-e983-4fb9-a46c-86be2b10f4f7

📥 Commits

Reviewing files that changed from the base of the PR and between 75e2cee and 74598b7.

📒 Files selected for processing (2)
  • tests/integration/test_lists/waives.txt
  • tests/unittest/_torch/misc/test_autotuner.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • tests/unittest/_torch/misc/test_autotuner.py

@peaceh-nv

Copy link
Copy Markdown
Collaborator

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61558 [ run ] triggered by Bot. Commit: 74598b7 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61558 [ run ] completed with state SUCCESS. Commit: 74598b7
/LLM/main/L0_MergeRequest_PR pipeline #49769 completed with status: 'SUCCESS'

CI Report

Link to invocation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants